<?

// resize image	
function create_thumbnail($old, $new, $w=90, $h=120)
{	
	$CI =& get_instance();
	$config['image_library'] = 'gd2';
	$config['source_image'] = $old;
	$config['create_thumb'] = TRUE;
	$config['maintain_ratio'] = TRUE;
	$config['thumb_marker'] = null;		
	$config['new_image'] = $new;
	$config['width'] = $w;
	$config['height'] = $h;		
	$CI->load->library('image_lib', $config); 
	
	$CI->image_lib->resize();
}

?>